diff options
Diffstat (limited to 'src/routes/(app)/[username]')
| -rw-r--r-- | src/routes/(app)/[username]/invoice/+server.js | 6 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/invoice/[hash]/tip/+page.svelte | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/routes/(app)/[username]/invoice/+server.js b/src/routes/(app)/[username]/invoice/+server.js index 1321739e..461d380c 100644 --- a/src/routes/(app)/[username]/invoice/+server.js +++ b/src/routes/(app)/[username]/invoice/+server.js @@ -1,5 +1,7 @@ import { auth, post } from '$lib/utils'; import { json } from '@sveltejs/kit'; -export let POST = async ({ cookies: c, request: r }) => - json(await post('/invoice', await r.json(), auth(c))); +export let POST = async ({ cookies: c, request: r }) => { + let j = await r.json(); + return json(await post('/invoice', j, auth(c))); +}; diff --git a/src/routes/(app)/[username]/invoice/[hash]/tip/+page.svelte b/src/routes/(app)/[username]/invoice/[hash]/tip/+page.svelte index 296ef9c6..9d9021a6 100644 --- a/src/routes/(app)/[username]/invoice/[hash]/tip/+page.svelte +++ b/src/routes/(app)/[username]/invoice/[hash]/tip/+page.svelte @@ -59,6 +59,7 @@ let { invoice, id, user } = data; let { amount, + hash, type, rate, received, @@ -79,6 +80,7 @@ ({ invoice, id } = data); ({ amount, + hash, type, rate, received, @@ -110,6 +112,8 @@ <input type="hidden" name="rate" value={rate} /> <input type="hidden" name="prompt" value="false" /> <input type="hidden" name="type" value={type} /> + <input type="hidden" name="hash" value={hash} /> + <input type="hidden" name="request_id" value={invoice.request?.id} /> <h1 class="text-4xl font-semibold my-8">{$t('invoice.addTipq')}</h1> |
